<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>数组</title>
    </head>
    <body>
        <?php
        // put your code here
        $teacher=array("苹果","香蕉","柚子","芒果","梨");
        //echo $teacher[2];
        //var_dump($teacher);
        for($i=0;$i<count($teacher);$i++)
        {
            echo $teacher[$i];
        }
        
        echo "<hr/>";
        
        
        
        $arr=array("id"=>"1001","pname"=>"电脑","price"=>7000,"number"=>500);
        foreach($arr as $k=>$v)
        {
            echo $k.'的值是'.$v."<br/>";
        }
        
        
        $va=array("优秀","良好","中等","及格","不及格");
//        echo "<table border='1'>";
//            echo"<tr>";
//            for($y=0;$y<count($va);$y++)
//            {
//                echo "<td>";
//                echo $va[$y];
//                echo "</td>";
//            }
//            echo"</tr>";
//        echo"</table>";
        echo "<select name='city'>";
        foreach ($va as $v)
        {
            echo"<option>{$v}</option>";
        }
        echo "</select>";
        
        
        ?>  <select name="bg">
<option></option>
<option></option>
</select>
    </body>
</html>
